

<!DOCTYPE html>
<!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]-->
<head>
  <meta charset="utf-8">
  
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  
  <title>API reference &mdash; pymilvus 1.0.1 documentation</title>
  

  
  
  
  

  
  <script type="text/javascript" src="_static/js/modernizr.min.js"></script>
  
    
      <script type="text/javascript" id="documentation_options" data-url_root="./" src="_static/documentation_options.js"></script>
        <script type="text/javascript" src="_static/jquery.js"></script>
        <script type="text/javascript" src="_static/underscore.js"></script>
        <script type="text/javascript" src="_static/doctools.js"></script>
        <script type="text/javascript" src="_static/language_data.js"></script>
        <script type="text/javascript" src="_static/clipboard.min.js"></script>
        <script type="text/javascript" src="_static/copybutton.js"></script>
        <script async="async" type="text/javascript" src="https://assets.readthedocs.org/static/javascript/readthedocs-doc-embed.js"></script>
    
    <script type="text/javascript" src="_static/js/theme.js"></script>

    

  
  <link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
  <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
  <link rel="stylesheet" href="_static/copybutton.css" type="text/css" />
    <link rel="author" title="About these documents" href="about.html" />
    <link rel="index" title="Index" href="genindex.html" />
    <link rel="search" title="Search" href="search.html" />
    <link rel="next" title="Index" href="param.html" />
    <link rel="prev" title="Tutorial" href="tutorial.html" /> 

<!-- RTD Extra Head -->

<link rel="stylesheet" href="https://assets.readthedocs.org/static/css/readthedocs-doc-embed.css" type="text/css" />

<script type="application/json" id="READTHEDOCS_DATA">{"ad_free": false, "api_host": "https://readthedocs.org", "build_date": "2021-03-26T03:06:15Z", "builder": "sphinx", "canonical_url": null, "commit": "26c94265", "docroot": "/docs/source/", "features": {"docsearch_disabled": false}, "global_analytics_code": "UA-17997319-1", "language": "en", "page": "api", "programming_language": "py", "project": "pymilvus", "proxied_api_host": "/_", "source_suffix": ".rst", "subprojects": {}, "theme": "sphinx_rtd_theme", "user_analytics_code": "", "version": "1.0"}</script>

<!--
Using this variable directly instead of using `JSON.parse` is deprecated.
The READTHEDOCS_DATA global variable will be removed in the future.
-->
<script type="text/javascript">
READTHEDOCS_DATA = JSON.parse(document.getElementById('READTHEDOCS_DATA').innerHTML);
</script>

<script type="text/javascript" src="https://assets.readthedocs.org/static/javascript/readthedocs-analytics.js" async="async"></script>

<!-- end RTD <extrahead> -->
</head>

<body class="wy-body-for-nav">

   
  <div class="wy-grid-for-nav">
    
    <nav data-toggle="wy-nav-shift" class="wy-nav-side">
      <div class="wy-side-scroll">
        <div class="wy-side-nav-search" >
          

          
            <a href="index.html" class="icon icon-home"> pymilvus
          

          
          </a>

          
            
            
            
              <div class="version">
                1.0
              </div>
            
          

          
<div role="search">
  <form id="rtd-search-form" class="wy-form" action="search.html" method="get">
    <input type="text" name="q" placeholder="Search docs" />
    <input type="hidden" name="check_keywords" value="yes" />
    <input type="hidden" name="area" value="default" />
  </form>
</div>

          
        </div>

        <div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
          
            
            
              
            
            
              <p class="caption"><span class="caption-text">Table of Contents</span></p>
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="install.html">Installation</a></li>
<li class="toctree-l1"><a class="reference internal" href="tutorial.html">Tutorial</a></li>
<li class="toctree-l1 current"><a class="current reference internal" href="#">API reference</a><ul>
<li class="toctree-l2"><a class="reference internal" href="#client">Client</a><ul>
<li class="toctree-l3"><a class="reference internal" href="#constructor">Constructor</a></li>
<li class="toctree-l3"><a class="reference internal" href="#methods">Methods</a></li>
<li class="toctree-l3"><a class="reference internal" href="#apis">APIs</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="#index-type">Index Type</a></li>
<li class="toctree-l2"><a class="reference internal" href="#metric-type">Metric Type</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="param.html">Index</a></li>
<li class="toctree-l1"><a class="reference internal" href="results.html">Search results</a></li>
<li class="toctree-l1"><a class="reference internal" href="changes.html">Changelog</a></li>
<li class="toctree-l1"><a class="reference internal" href="faq.html">FAQ</a></li>
<li class="toctree-l1"><a class="reference internal" href="contribute.html">Contributing</a></li>
<li class="toctree-l1"><a class="reference internal" href="about.html">About this documentation</a></li>
</ul>

            
          
        </div>
      </div>
    </nav>

    <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">

      
      <nav class="wy-nav-top" aria-label="top navigation">
        
          <i data-toggle="wy-nav-top" class="fa fa-bars"></i>
          <a href="index.html">pymilvus</a>
        
      </nav>


      <div class="wy-nav-content">
        
        <div class="rst-content">
        
          















<div role="navigation" aria-label="breadcrumbs navigation">

  <ul class="wy-breadcrumbs">
    
      <li><a href="index.html">Docs</a> &raquo;</li>
        
      <li>API reference</li>
    
    
      <li class="wy-breadcrumbs-aside">
        
            
            
              <a href="https://github.com/milvus-io/pymilvus/blob/1.0/docs/source/api.rst" class="fa fa-github"> Edit on GitHub</a>
            
          
        
      </li>
    
  </ul>

  
  <hr/>
</div>
          <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">

           <div itemprop="articleBody">
            
  <div class="section" id="api-reference">
<h1>API reference<a class="headerlink" href="#api-reference" title="Permalink to this headline">¶</a></h1>
<div class="section" id="client">
<h2>Client<a class="headerlink" href="#client" title="Permalink to this headline">¶</a></h2>
<div class="section" id="constructor">
<h3>Constructor<a class="headerlink" href="#constructor" title="Permalink to this headline">¶</a></h3>
<table class="docutils align-default">
<colgroup>
<col style="width: 36%" />
<col style="width: 64%" />
</colgroup>
<thead>
<tr class="row-odd"><th class="head"><p>Constructor</p></th>
<th class="head"><p>Description</p></th>
</tr>
</thead>
<tbody>
<tr class="row-even"><td><p><a class="reference external" href="#milvus.Milvus">Milvus()</a></p></td>
<td><p>Milvus client</p></td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="methods">
<h3>Methods<a class="headerlink" href="#methods" title="Permalink to this headline">¶</a></h3>
<table class="docutils align-default">
<colgroup>
<col style="width: 49%" />
<col style="width: 51%" />
</colgroup>
<thead>
<tr class="row-odd"><th class="head"><p>API</p></th>
<th class="head"><p>Description</p></th>
</tr>
</thead>
<tbody>
<tr class="row-even"><td><p><a class="reference external" href="#milvus.Milvus.create_collection">create_collection()</a></p></td>
<td><p>Creates a collection.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference external" href="#milvus.Milvus.has_collection">has_collection()</a></p></td>
<td><p>Checks if a collection exists.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference external" href="#milvus.Milvus.get_collection_info">get_collection_info()</a></p></td>
<td><p>Gets information of a specified collection.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference external" href="#milvus.Milvus.count_entities">count_entities()</a></p></td>
<td><p>Gets the number of entities in a collection.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference external" href="#milvus.Milvus.list_collections">list_collections()</a></p></td>
<td><p>Gets a list of collections.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference external" href="#milvus.Milvus.get_collection_stats">get_collection_stats()</a></p></td>
<td><p>Gets collection statistics.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference external" href="#milvus.Milvus.load_collection">load_collection()</a></p></td>
<td><p>Loads a specified collection from storage to memory.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference external" href="#milvus.Milvus.drop_collection">drop_collection()</a></p></td>
<td><p>Removes a collection.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference external" href="#milvus.Milvus.insert">insert()</a></p></td>
<td><p>Inserts entities to a specified collection.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference external" href="#milvus.Milvus.get_entity_by_id">get_entity_by_id()</a></p></td>
<td><p>Gets entities by entity ID.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference external" href="#milvus.Milvus.list_id_in_segment">list_id_in_segment()</a></p></td>
<td><p>Gets the list of ids in a specified segment.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference external" href="#milvus.Milvus.create_index">create_index()</a></p></td>
<td><p>Creates an index for a specified field.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference external" href="#milvus.Milvus.get_index_info">get_index_info()</a></p></td>
<td><p>Get index information.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference external" href="#milvus.Milvus.drop_index">drop_index()</a></p></td>
<td><p>Removes index from a specified field.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference external" href="#milvus.Milvus.create_partition">create_partition()</a></p></td>
<td><p>Creates a partition in a specified collection.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference external" href="#milvus.Milvus.has_partition">has_partition()</a></p></td>
<td><p>Checks if a partition exists in a specified collection.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference external" href="#milvus.Milvus.list_partitions">list_partitions()</a></p></td>
<td><p>Gets a partition list from a specified collection.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference external" href="#milvus.Milvus.drop_partition">drop_partition()</a></p></td>
<td><p>Removes a specified partition from a collection.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference external" href="#milvus.Milvus.search">search()</a></p></td>
<td><p>Searches for approximate nearest entities.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference external" href="#milvus.Milvus.delete_entity_by_id">delete_entity_by_id()</a></p></td>
<td><p>Deletes entities by entity ID.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference external" href="#milvus.Milvus.flush">flush()</a></p></td>
<td><p>Flushes collection data from memory to storage.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference external" href="#milvus.Milvus.compact">compact()</a></p></td>
<td><p>Compacts a specified collection.</p></td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="apis">
<h3>APIs<a class="headerlink" href="#apis" title="Permalink to this headline">¶</a></h3>
<dl class="class">
<dt id="milvus.Milvus">
<em class="property">class </em><code class="sig-prename descclassname">milvus.</code><code class="sig-name descname">Milvus</code><span class="sig-paren">(</span><em class="sig-param">host=None</em>, <em class="sig-param">port=None</em>, <em class="sig-param">handler='GRPC'</em>, <em class="sig-param">pool='SingletonThread'</em>, <em class="sig-param">**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/milvus/client/stub.html#Milvus"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#milvus.Milvus" title="Permalink to this definition">¶</a></dt>
<dd><dl class="method">
<dt id="milvus.Milvus.create_collection">
<code class="sig-name descname">create_collection</code><span class="sig-paren">(</span><em class="sig-param">param</em>, <em class="sig-param">timeout=30</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/milvus/client/stub.html#Milvus.create_collection"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#milvus.Milvus.create_collection" title="Permalink to this definition">¶</a></dt>
<dd><p>Creates a collection.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>param</strong> (<em>dict</em>) – <p>Information needed to create a collection. It contains items:</p>
<ul>
<li><p><em>collection_name</em> (<code class="docutils literal notranslate"><span class="pre">str</span></code>) – Collection name.</p></li>
<li><p><em>dimension</em> (<code class="docutils literal notranslate"><span class="pre">int</span></code>) – Dimension of embeddings stored in collection.</p></li>
<li><p><em>index_file_size</em> (<code class="docutils literal notranslate"><span class="pre">int</span></code>) – Segment size. See
<a class="reference external" href="https://milvus.io/docs/v1.0.0/storage_concept.md">Storage Concepts</a>.</p></li>
<li><p><em>metric_type</em> (<code class="docutils literal notranslate"><span class="pre">MetricType</span></code>) – Distance Metrics type. Valued form
<a class="reference internal" href="#milvus.MetricType" title="milvus.MetricType"><code class="xref py py-class docutils literal notranslate"><span class="pre">MetricType</span></code></a>. See
<a class="reference external" href="https://milvus.io/docs/v1.0.0/metric.md">Distance Metrics</a>.</p></li>
</ul>
<p>A demo is as follow:</p>
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="n">param</span><span class="o">=</span><span class="p">{</span><span class="s1">&#39;collection_name&#39;</span><span class="p">:</span> <span class="s1">&#39;name&#39;</span><span class="p">,</span>
   <span class="s1">&#39;dimension&#39;</span><span class="p">:</span> <span class="mi">16</span><span class="p">,</span>
   <span class="s1">&#39;index_file_size&#39;</span><span class="p">:</span> <span class="mi">1024</span> <span class="c1"># Optional, default 1024，</span>
   <span class="s1">&#39;metric_type&#39;</span><span class="p">:</span> <span class="n">MetricType</span><span class="o">.</span><span class="n">L2</span> <span class="c1"># Optional, default MetricType.L2</span>
  <span class="p">}</span>
</pre></div>
</div>
</p></li>
<li><p><strong>timeout</strong> (<em>float</em>) – An optional duration of time in seconds to allow for the RPC. When timeout
is set to None, client waits until server responses or error occurs.</p></li>
</ul>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>The operation status. Succeed if <cite>Status.OK()</cite> is <cite>True</cite>.</p>
</dd>
<dt class="field-odd">Return type</dt>
<dd class="field-odd"><p>Status</p>
</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="milvus.Milvus.has_collection">
<code class="sig-name descname">has_collection</code><span class="sig-paren">(</span><em class="sig-param">collection_name</em>, <em class="sig-param">timeout=30</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/milvus/client/stub.html#Milvus.has_collection"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#milvus.Milvus.has_collection" title="Permalink to this definition">¶</a></dt>
<dd><p>Checks whether a collection exists.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>collection_name</strong> (<em>str</em>) – Name of the collection to check.</p></li>
<li><p><strong>timeout</strong> (<em>float</em>) – An optional duration of time in seconds to allow for the RPC. When timeout
is set to None, client waits until server responses or error occurs.</p></li>
</ul>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>The operation status and the flag indicating if collection exists. Succeed
if <cite>Status.OK()</cite> is <cite>True</cite>. If status is not OK, the flag is always <cite>False</cite>.</p>
</dd>
<dt class="field-odd">Return type</dt>
<dd class="field-odd"><p>Status, bool</p>
</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="milvus.Milvus.get_collection_info">
<code class="sig-name descname">get_collection_info</code><span class="sig-paren">(</span><em class="sig-param">collection_name</em>, <em class="sig-param">timeout=30</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/milvus/client/stub.html#Milvus.get_collection_info"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#milvus.Milvus.get_collection_info" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns information of a collection.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>collection_name</strong> (<em>str</em>) – Name of the collection to describe.</p></li>
<li><p><strong>timeout</strong> (<em>float</em>) – An optional duration of time in seconds to allow for the RPC. When timeout
is set to None, client waits until server responses or error occurs.</p></li>
</ul>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>The operation status and collection information. Succeed if <cite>Status.OK()</cite>
is <cite>True</cite>. If status is not OK, the returned information is always <cite>None</cite>.</p>
</dd>
<dt class="field-odd">Return type</dt>
<dd class="field-odd"><p>Status, CollectionSchema</p>
</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="milvus.Milvus.count_entities">
<code class="sig-name descname">count_entities</code><span class="sig-paren">(</span><em class="sig-param">collection_name</em>, <em class="sig-param">timeout=30</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/milvus/client/stub.html#Milvus.count_entities"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#milvus.Milvus.count_entities" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns the number of vectors in a collection.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>collection_name</strong> (<em>str</em>) – target table name.</p></li>
<li><p><strong>timeout</strong> (<em>float</em>) – An optional duration of time in seconds to allow for the RPC. When timeout
is set to None, client waits until server responses or error occurs.</p></li>
</ul>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>The operation status and row count. Succeed if <cite>Status.OK()</cite> is <cite>True</cite>.
If status is not OK, the returned value of is always <cite>None</cite>.</p>
</dd>
<dt class="field-odd">Return type</dt>
<dd class="field-odd"><p>Status, int</p>
</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="milvus.Milvus.list_collections">
<code class="sig-name descname">list_collections</code><span class="sig-paren">(</span><em class="sig-param">timeout=30</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/milvus/client/stub.html#Milvus.list_collections"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#milvus.Milvus.list_collections" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns collection list.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>timeout</strong> (<em>float</em>) – An optional duration of time in seconds to allow for the RPC. When timeout
is set to None, client waits until server responses or error occurs.</p>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>The operation status and collection name list. Succeed if <cite>Status.OK()</cite> is <cite>True</cite>.
If status is not OK, the returned name list is always <cite>[]</cite>.</p>
</dd>
<dt class="field-odd">Return type</dt>
<dd class="field-odd"><p>Status, list[str]</p>
</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="milvus.Milvus.get_collection_stats">
<code class="sig-name descname">get_collection_stats</code><span class="sig-paren">(</span><em class="sig-param">collection_name</em>, <em class="sig-param">timeout=30</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/milvus/client/stub.html#Milvus.get_collection_stats"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#milvus.Milvus.get_collection_stats" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns collection statistics information.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>collection_name</strong> (<em>str</em>) – target table name.</p></li>
<li><p><strong>timeout</strong> (<em>float</em>) – An optional duration of time in seconds to allow for the RPC. When timeout
is set to None, client waits until server responses or error occurs.</p></li>
</ul>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>The operation status and collection statistics information. Succeed
if <cite>Status.OK()</cite> is <cite>True</cite>. If status is not OK, the returned information
is always <cite>[]</cite>.</p>
</dd>
<dt class="field-odd">Return type</dt>
<dd class="field-odd"><p>Status, dict</p>
</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="milvus.Milvus.load_collection">
<code class="sig-name descname">load_collection</code><span class="sig-paren">(</span><em class="sig-param">collection_name</em>, <em class="sig-param">partition_tags=None</em>, <em class="sig-param">timeout=None</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/milvus/client/stub.html#Milvus.load_collection"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#milvus.Milvus.load_collection" title="Permalink to this definition">¶</a></dt>
<dd><p>Loads a collection for caching.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>collection_name</strong> (<em>str</em>) – collection to load</p></li>
<li><p><strong>partition_tags</strong> – partition tag list. <cite>None</cite> indicates to load whole collection,
otherwise to load specified partitions.</p></li>
<li><p><strong>timeout</strong> (<em>float</em>) – An optional duration of time in seconds to allow for the RPC. When timeout
is set to None, client waits until server responses or error occurs.</p></li>
</ul>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>The operation status. Succeed if <cite>Status.OK()</cite> is <cite>True</cite>.</p>
</dd>
<dt class="field-odd">Return type</dt>
<dd class="field-odd"><p>Status</p>
</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="milvus.Milvus.drop_collection">
<code class="sig-name descname">drop_collection</code><span class="sig-paren">(</span><em class="sig-param">collection_name</em>, <em class="sig-param">timeout=30</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/milvus/client/stub.html#Milvus.drop_collection"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#milvus.Milvus.drop_collection" title="Permalink to this definition">¶</a></dt>
<dd><p>Deletes a collection by name.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>collection_name</strong> (<em>str</em>) – Name of the collection being deleted</p></li>
<li><p><strong>timeout</strong> (<em>float</em>) – An optional duration of time in seconds to allow for the RPC. When timeout
is set to None, client waits until server responses or error occurs.</p></li>
</ul>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>The operation status. Succeed if <cite>Status.OK()</cite> is <cite>True</cite>.</p>
</dd>
<dt class="field-odd">Return type</dt>
<dd class="field-odd"><p>Status</p>
</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="milvus.Milvus.insert">
<code class="sig-name descname">insert</code><span class="sig-paren">(</span><em class="sig-param">collection_name</em>, <em class="sig-param">records</em>, <em class="sig-param">ids=None</em>, <em class="sig-param">partition_tag=None</em>, <em class="sig-param">params=None</em>, <em class="sig-param">timeout=None</em>, <em class="sig-param">**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/milvus/client/stub.html#Milvus.insert"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#milvus.Milvus.insert" title="Permalink to this definition">¶</a></dt>
<dd><p>Insert vectors to a collection.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>collection_name</strong> (<em>str</em>) – Name of the collection to insert vectors to.</p></li>
<li><p><strong>ids</strong> (<em>list</em><em>[</em><em>int</em><em>]</em>) – ID list. <cite>None</cite> indicates ID is generated by server system. Note that if the
first time when insert() is invoked ids is not passed into this method, each
of the rest time when inset() is invoked ids is not permitted to pass,
otherwise server will return an error and the insertion process will fail.
And vice versa.</p></li>
<li><p><strong>records</strong> (<em>list</em><em>[</em><em>list</em><em>[</em><em>float</em><em>]</em><em>]</em>) – List of vectors to insert.</p></li>
<li><p><strong>partition_tag</strong> (str or None. If partition_tag is None, vectors will be inserted to the
default partition <cite>_default</cite>.) – Tag of a partition.</p></li>
<li><p><strong>params</strong> (<em>dict</em>) – Insert param. Reserved.</p></li>
<li><p><strong>timeout</strong> (<em>float</em>) – An optional duration of time in seconds to allow for the RPC. When timeout
is set to None, client waits until server responses or error occurs.</p></li>
<li><p><strong>kwargs</strong> – <ul>
<li><p><em>_async</em> (<code class="docutils literal notranslate"><span class="pre">bool</span></code>) –
Indicate if invoke asynchronously. When value is true, method returns a InsertFuture
object; otherwise, method returns results from server.</p></li>
<li><p><em>_callback</em> (<code class="docutils literal notranslate"><span class="pre">function</span></code>) –
The callback function which is invoked after server response successfully. It only
takes effect when _async is set to True.</p></li>
</ul>
</p></li>
</ul>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>The operation status and IDs of inserted entities. Succeed if <cite>Status.OK()</cite>
is <cite>True</cite>. If status is not OK, the returned IDs is always <cite>[]</cite>.</p>
</dd>
<dt class="field-odd">Return type</dt>
<dd class="field-odd"><p>Status, list[int]</p>
</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="milvus.Milvus.get_entity_by_id">
<code class="sig-name descname">get_entity_by_id</code><span class="sig-paren">(</span><em class="sig-param">collection_name</em>, <em class="sig-param">ids</em>, <em class="sig-param">timeout=None</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/milvus/client/stub.html#Milvus.get_entity_by_id"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#milvus.Milvus.get_entity_by_id" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns raw vectors according to ids.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>collection_name</strong> (<em>str</em>) – Name of the collection</p></li>
<li><p><strong>ids</strong> (<em>list</em>) – list of vector id</p></li>
<li><p><strong>timeout</strong> (<em>float</em>) – An optional duration of time in seconds to allow for the RPC. When timeout
is set to None, client waits until server responses or error occurs.</p></li>
</ul>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>The operation status and entities. Succeed if <cite>Status.OK()</cite> is <cite>True</cite>.
If status is not OK, the returned entities is always <cite>[]</cite>.</p>
</dd>
<dt class="field-odd">Return type</dt>
<dd class="field-odd"><p>Status, list[list[float]]</p>
</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="milvus.Milvus.list_id_in_segment">
<code class="sig-name descname">list_id_in_segment</code><span class="sig-paren">(</span><em class="sig-param">collection_name</em>, <em class="sig-param">segment_name</em>, <em class="sig-param">timeout=None</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/milvus/client/stub.html#Milvus.list_id_in_segment"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#milvus.Milvus.list_id_in_segment" title="Permalink to this definition">¶</a></dt>
<dd><p>Get IDs of entity stored in the specified segment.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>collection_name</strong> (<em>str</em>) – Collection the segment belongs to.</p></li>
<li><p><strong>segment_name</strong> (<em>str</em>) – Segment name.</p></li>
<li><p><strong>timeout</strong> (<em>float</em>) – An optional duration of time in seconds to allow for the RPC. When timeout
is set to None, client waits until server responses or error occurs.</p></li>
</ul>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>The operation status and entity IDs. Succeed if <cite>Status.OK()</cite> is <cite>True</cite>.
If status is not OK, the returned IDs is always <cite>[]</cite>.</p>
</dd>
<dt class="field-odd">Return type</dt>
<dd class="field-odd"><p>Status, list[int]</p>
</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="milvus.Milvus.create_index">
<code class="sig-name descname">create_index</code><span class="sig-paren">(</span><em class="sig-param">collection_name</em>, <em class="sig-param">index_type=None</em>, <em class="sig-param">params=None</em>, <em class="sig-param">timeout=None</em>, <em class="sig-param">**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/milvus/client/stub.html#Milvus.create_index"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#milvus.Milvus.create_index" title="Permalink to this definition">¶</a></dt>
<dd><p>Creates index for a collection.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>collection_name</strong> (<em>str</em>) – Collection used to create index.</p></li>
<li><p><strong>index_type</strong> (<a class="reference internal" href="#milvus.IndexType" title="milvus.IndexType"><em>IndexType</em></a>) – index params. See <a class="reference external" href="param.html">index params</a> for supported indexes.</p></li>
<li><p><strong>params</strong> (<em>dict</em>) – <p>Index param. See <a class="reference external" href="param.html">index params</a> for detailed index param of
supported indexes.</p>
</p></li>
<li><p><strong>timeout</strong> (<em>float</em>) – An optional duration of time in seconds to allow for the RPC. When timeout
is set to None, client waits until server responses or error occurs.</p></li>
<li><p><strong>kwargs</strong> – <ul>
<li><p><em>_async</em> (<code class="docutils literal notranslate"><span class="pre">bool</span></code>) –
Indicate if invoke asynchronously. When value is true, method returns a IndexFuture
object; otherwise, method returns results from server.</p></li>
<li><p><em>_callback</em> (<code class="docutils literal notranslate"><span class="pre">function</span></code>) –
The callback function which is invoked after server response successfully. It only
takes effect when _async is set to True.</p></li>
</ul>
</p></li>
</ul>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>The operation status. Succeed if <cite>Status.OK()</cite> is <cite>True</cite>.</p>
</dd>
<dt class="field-odd">Return type</dt>
<dd class="field-odd"><p>Status</p>
</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="milvus.Milvus.get_index_info">
<code class="sig-name descname">get_index_info</code><span class="sig-paren">(</span><em class="sig-param">collection_name</em>, <em class="sig-param">timeout=30</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/milvus/client/stub.html#Milvus.get_index_info"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#milvus.Milvus.get_index_info" title="Permalink to this definition">¶</a></dt>
<dd><p>Show index information of a collection.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>collection_name</strong> (<em>str</em>) – table name been queried</p></li>
<li><p><strong>timeout</strong> (<em>float</em>) – An optional duration of time in seconds to allow for the RPC. When timeout
is set to None, client waits until server responses or error occurs.</p></li>
</ul>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>The operation status and index info. Succeed if <cite>Status.OK()</cite> is <cite>True</cite>.
If status is not OK, the returned index info is always <cite>None</cite>.</p>
</dd>
<dt class="field-odd">Return type</dt>
<dd class="field-odd"><p>Status, IndexParam</p>
</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="milvus.Milvus.drop_index">
<code class="sig-name descname">drop_index</code><span class="sig-paren">(</span><em class="sig-param">collection_name</em>, <em class="sig-param">timeout=30</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/milvus/client/stub.html#Milvus.drop_index"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#milvus.Milvus.drop_index" title="Permalink to this definition">¶</a></dt>
<dd><p>Removes an index.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>collection_name</strong> (<em>str</em>) – target collection name.</p></li>
<li><p><strong>timeout</strong> (<em>float</em>) – An optional duration of time in seconds to allow for the RPC. When timeout
is set to None, client waits until server responses or error occurs.</p></li>
</ul>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>The operation status. Succeed if <cite>Status.OK()</cite> is <cite>True</cite>.</p>
</dd>
<dt class="field-odd">Return type</dt>
<dd class="field-odd"><p>Status</p>
</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="milvus.Milvus.create_partition">
<code class="sig-name descname">create_partition</code><span class="sig-paren">(</span><em class="sig-param">collection_name</em>, <em class="sig-param">partition_tag</em>, <em class="sig-param">timeout=30</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/milvus/client/stub.html#Milvus.create_partition"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#milvus.Milvus.create_partition" title="Permalink to this definition">¶</a></dt>
<dd><p>create a partition for a collection.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>collection_name</strong> (<em>str</em>) – Name of the collection.</p></li>
<li><p><strong>partition_tag</strong> (<em>str</em>) – Name of the partition tag.</p></li>
<li><p><strong>timeout</strong> (<em>float</em>) – An optional duration of time in seconds to allow for the RPC. When timeout
is set to None, client waits until server responses or error occurs.</p></li>
</ul>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>The operation status. Succeed if <cite>Status.OK()</cite> is <cite>True</cite>.</p>
</dd>
<dt class="field-odd">Return type</dt>
<dd class="field-odd"><p>Status</p>
</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="milvus.Milvus.has_partition">
<code class="sig-name descname">has_partition</code><span class="sig-paren">(</span><em class="sig-param">collection_name</em>, <em class="sig-param">partition_tag</em>, <em class="sig-param">timeout=30</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/milvus/client/stub.html#Milvus.has_partition"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#milvus.Milvus.has_partition" title="Permalink to this definition">¶</a></dt>
<dd><p>Check if specified partition exists.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>collection_name</strong> (<em>str</em>) – target table name.</p></li>
<li><p><strong>partition_tag</strong> (<em>str</em>) – partition tag.</p></li>
<li><p><strong>timeout</strong> (<em>float</em>) – An optional duration of time in seconds to allow for the RPC. When timeout
is set to None, client waits until server responses or error occurs.</p></li>
</ul>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>The operation status and a flag indicating if partition exists. Succeed
if <cite>Status.OK()</cite> is <cite>True</cite>. If status is not ok, the flag is always <cite>False</cite>.</p>
</dd>
<dt class="field-odd">Return type</dt>
<dd class="field-odd"><p>Status, bool</p>
</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="milvus.Milvus.list_partitions">
<code class="sig-name descname">list_partitions</code><span class="sig-paren">(</span><em class="sig-param">collection_name</em>, <em class="sig-param">timeout=30</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/milvus/client/stub.html#Milvus.list_partitions"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#milvus.Milvus.list_partitions" title="Permalink to this definition">¶</a></dt>
<dd><p>Show all partitions in a collection.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>collection_name</strong> (<em>str</em>) – target table name.</p></li>
<li><p><strong>timeout</strong> (<em>float</em>) – An optional duration of time in seconds to allow for the RPC. When timeout
is set to None, client waits until server responses or error occurs.</p></li>
</ul>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>The operation status and partition list. Succeed if <cite>Status.OK()</cite> is <cite>True</cite>.
If status is not OK, returned partition list is <cite>[]</cite>.</p>
</dd>
<dt class="field-odd">Return type</dt>
<dd class="field-odd"><p>Status, list[PartitionParam]</p>
</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="milvus.Milvus.drop_partition">
<code class="sig-name descname">drop_partition</code><span class="sig-paren">(</span><em class="sig-param">collection_name</em>, <em class="sig-param">partition_tag</em>, <em class="sig-param">timeout=30</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/milvus/client/stub.html#Milvus.drop_partition"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#milvus.Milvus.drop_partition" title="Permalink to this definition">¶</a></dt>
<dd><p>Deletes a partition in a collection.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>collection_name</strong> (<em>str</em>) – Collection name.</p></li>
<li><p><strong>partition_tag</strong> (<em>str</em>) – Partition name.</p></li>
<li><p><strong>timeout</strong> (<em>float</em>) – An optional duration of time in seconds to allow for the RPC. When timeout
is set to None, client waits until server responses or error occurs.</p></li>
</ul>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>The operation status. Succeed if <cite>Status.OK()</cite> is <cite>True</cite>.</p>
</dd>
<dt class="field-odd">Return type</dt>
<dd class="field-odd"><p>Status</p>
</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="milvus.Milvus.search">
<code class="sig-name descname">search</code><span class="sig-paren">(</span><em class="sig-param">collection_name</em>, <em class="sig-param">top_k</em>, <em class="sig-param">query_records</em>, <em class="sig-param">partition_tags=None</em>, <em class="sig-param">params=None</em>, <em class="sig-param">timeout=None</em>, <em class="sig-param">**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/milvus/client/stub.html#Milvus.search"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#milvus.Milvus.search" title="Permalink to this definition">¶</a></dt>
<dd><p>Search vectors in a collection.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>collection_name</strong> (<em>str</em>) – Name of the collection.</p></li>
<li><p><strong>top_k</strong> (<em>int</em>) – number of vectors which is most similar with query vectors</p></li>
<li><p><strong>query_records</strong> (<em>list</em><em>[</em><em>list</em><em>[</em><em>float32</em><em>]</em><em>]</em>) – vectors to query</p></li>
<li><p><strong>partition_tags</strong> (<em>list</em>) – tags to search. <cite>None</cite> indicates to search in whole collection.</p></li>
<li><p><strong>params</strong> (<em>dict</em>) – <p>Search params. The params is related to index type the collection is built.
See <a class="reference external" href="param.html">index params</a> for more detailed information.</p>
</p></li>
<li><p><strong>timeout</strong> (<em>float</em>) – An optional duration of time in seconds to allow for the RPC. When timeout
is set to None, client waits until server responses or error occurs.</p></li>
<li><p><strong>kwargs</strong> – <ul>
<li><p><em>_async</em> (<code class="docutils literal notranslate"><span class="pre">bool</span></code>) –
Indicate if invoke asynchronously. When value is true, method returns a SearchFuture
object; otherwise, method returns results from server.</p></li>
<li><p><em>_callback</em> (<code class="docutils literal notranslate"><span class="pre">function</span></code>) –
The callback function which is invoked after server response successfully. It only
takes effect when _async is set to True.</p></li>
</ul>
</p></li>
</ul>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>The operation status and search result. See &lt;a&gt;here&lt;/a&gt; to find how to handle
search result. Succeed if <cite>Status.OK()</cite> is <cite>True</cite>. If status is not OK,
results is always <cite>None</cite>.</p>
</dd>
<dt class="field-odd">Return type</dt>
<dd class="field-odd"><p>Status, TopKQueryResult</p>
</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="milvus.Milvus.delete_entity_by_id">
<code class="sig-name descname">delete_entity_by_id</code><span class="sig-paren">(</span><em class="sig-param">collection_name</em>, <em class="sig-param">id_array</em>, <em class="sig-param">timeout=None</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/milvus/client/stub.html#Milvus.delete_entity_by_id"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#milvus.Milvus.delete_entity_by_id" title="Permalink to this definition">¶</a></dt>
<dd><p>Deletes vectors in a collection by vector ID.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>collection_name</strong> (<em>str</em>) – Name of the collection.</p></li>
<li><p><strong>id_array</strong> (<em>list</em><em>[</em><em>int</em><em>]</em>) – list of vector id</p></li>
<li><p><strong>timeout</strong> (<em>float</em>) – An optional duration of time in seconds to allow for the RPC. When timeout
is set to None, client waits until server responses or error occurs.</p></li>
</ul>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>The operation status. If the specified ID doesn’t exist, Milvus server skip it
and try to delete next entities, which is regard as one successful operation.
Succeed if <cite>Status.OK()</cite> is <cite>True</cite>.</p>
</dd>
<dt class="field-odd">Return type</dt>
<dd class="field-odd"><p>Status</p>
</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="milvus.Milvus.flush">
<code class="sig-name descname">flush</code><span class="sig-paren">(</span><em class="sig-param">collection_name_array=None</em>, <em class="sig-param">timeout=None</em>, <em class="sig-param">**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/milvus/client/stub.html#Milvus.flush"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#milvus.Milvus.flush" title="Permalink to this definition">¶</a></dt>
<dd><p>Flushes vector data in one collection or multiple collections to disk.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>collection_name_array</strong> (<em>list</em>) – Name of one or multiple collections to flush.</p></li>
<li><p><strong>timeout</strong> (<em>float</em>) – An optional duration of time in seconds to allow for the RPC. When timeout
is set to None, client waits until server responses or error occurs.</p></li>
<li><p><strong>kwargs</strong> – <ul>
<li><p><em>_async</em> (<code class="docutils literal notranslate"><span class="pre">bool</span></code>) –
Indicate if invoke asynchronously. When value is true, method returns a FlushFuture
object; otherwise, method returns results from server.</p></li>
<li><p><em>_callback</em> (<code class="docutils literal notranslate"><span class="pre">function</span></code>) –
The callback function which is invoked after server response successfully. It only
takes effect when _async is set to True.</p></li>
</ul>
</p></li>
</ul>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>The operation status. Succeed if <cite>Status.OK()</cite> is <cite>True</cite>.</p>
</dd>
<dt class="field-odd">Return type</dt>
<dd class="field-odd"><p>Status</p>
</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="milvus.Milvus.compact">
<code class="sig-name descname">compact</code><span class="sig-paren">(</span><em class="sig-param">collection_name</em>, <em class="sig-param">timeout=None</em>, <em class="sig-param">**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/milvus/client/stub.html#Milvus.compact"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#milvus.Milvus.compact" title="Permalink to this definition">¶</a></dt>
<dd><p>Compacts segments in a collection. This function is recommended after deleting vectors.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>collection_name</strong> (<em>str</em>) – Name of the collections to compact.</p></li>
<li><p><strong>timeout</strong> (<em>float</em>) – An optional duration of time in seconds to allow for the RPC. When timeout
is set to None, client waits until server responses or error occurs.</p></li>
<li><p><strong>kwargs</strong> – <ul>
<li><p><em>_async</em> (<code class="docutils literal notranslate"><span class="pre">bool</span></code>) –
Indicate if invoke asynchronously. When value is true, method returns a CompactFuture
object; otherwise, method returns results from server.</p></li>
<li><p><em>_callback</em> (<code class="docutils literal notranslate"><span class="pre">function</span></code>) –
The callback function which is invoked after server response successfully. It only
takes effect when _async is set to True.</p></li>
</ul>
</p></li>
</ul>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>The operation status. Succeed if <cite>Status.OK()</cite> is <cite>True</cite>.</p>
</dd>
<dt class="field-odd">Return type</dt>
<dd class="field-odd"><p>Status</p>
</dd>
</dl>
</dd></dl>

</dd></dl>

</div>
</div>
<div class="section" id="index-type">
<h2>Index Type<a class="headerlink" href="#index-type" title="Permalink to this headline">¶</a></h2>
<dl class="class">
<dt id="milvus.IndexType">
<em class="property">class </em><code class="sig-prename descclassname">milvus.</code><code class="sig-name descname">IndexType</code><a class="reference internal" href="_modules/milvus/client/types.html#IndexType"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#milvus.IndexType" title="Permalink to this definition">¶</a></dt>
<dd><p>Index type enum.</p>
<dl class="attribute">
<dt id="milvus.IndexType.INVALID">
<code class="sig-name descname">INVALID</code><em class="property"> = 0</em><a class="headerlink" href="#milvus.IndexType.INVALID" title="Permalink to this definition">¶</a></dt>
<dd><p>Invalid index type.</p>
</dd></dl>

<dl class="attribute">
<dt id="milvus.IndexType.FLAT">
<code class="sig-name descname">FLAT</code><em class="property"> = 1</em><a class="headerlink" href="#milvus.IndexType.FLAT" title="Permalink to this definition">¶</a></dt>
<dd><p>FLAT index. See <a class="reference external" href="https://milvus.io/docs/v1.0.0/index.md#FLAT">FLAT</a>.</p>
</dd></dl>

<dl class="attribute">
<dt id="milvus.IndexType.IVF_FLAT">
<code class="sig-name descname">IVF_FLAT</code><em class="property"> = 2</em><a class="headerlink" href="#milvus.IndexType.IVF_FLAT" title="Permalink to this definition">¶</a></dt>
<dd><p>IVF(Inverted File) FLAT index.
See <a class="reference external" href="https://milvus.io/docs/v1.0.0/index.md#IVF_FLAT">IVF_FLAT</a>.</p>
</dd></dl>

<dl class="attribute">
<dt id="milvus.IndexType.IVF_SQ8">
<code class="sig-name descname">IVF_SQ8</code><em class="property"> = 3</em><a class="headerlink" href="#milvus.IndexType.IVF_SQ8" title="Permalink to this definition">¶</a></dt>
<dd><p>IVF SQ8 index. See <a class="reference external" href="https://milvus.io/docs/v1.0.0/index.md#IVF_SQ8">IVF_SQ8</a>.</p>
</dd></dl>

<dl class="attribute">
<dt id="milvus.IndexType.RNSG">
<code class="sig-name descname">RNSG</code><em class="property"> = 4</em><a class="headerlink" href="#milvus.IndexType.RNSG" title="Permalink to this definition">¶</a></dt>
<dd><p>RNSG(Refined NSG) index. See <a class="reference external" href="https://milvus.io/docs/v1.0.0/index.md#RNSG">RNSG</a>.</p>
</dd></dl>

<dl class="attribute">
<dt id="milvus.IndexType.IVF_SQ8H">
<code class="sig-name descname">IVF_SQ8H</code><em class="property"> = 5</em><a class="headerlink" href="#milvus.IndexType.IVF_SQ8H" title="Permalink to this definition">¶</a></dt>
<dd><p>IVF SQ8 Hybrid index. See <a class="reference external" href="https://milvus.io/docs/v1.0.0/index.md#IVF_SQ8H">IVF_SQ8H</a>.</p>
</dd></dl>

<dl class="attribute">
<dt id="milvus.IndexType.IVF_PQ">
<code class="sig-name descname">IVF_PQ</code><em class="property"> = 6</em><a class="headerlink" href="#milvus.IndexType.IVF_PQ" title="Permalink to this definition">¶</a></dt>
<dd><p>IVF PQ index. See <a class="reference external" href="https://milvus.io/docs/v1.0.0/index.md#IVF_PQ">IVF_PQ</a>.</p>
</dd></dl>

<dl class="attribute">
<dt id="milvus.IndexType.HNSW">
<code class="sig-name descname">HNSW</code><em class="property"> = 11</em><a class="headerlink" href="#milvus.IndexType.HNSW" title="Permalink to this definition">¶</a></dt>
<dd><p>HNSW index. See <a class="reference external" href="https://milvus.io/docs/v1.0.0/index.md#HNSW">HNSW</a>.</p>
</dd></dl>

<dl class="attribute">
<dt id="milvus.IndexType.ANNOY">
<code class="sig-name descname">ANNOY</code><em class="property"> = 12</em><a class="headerlink" href="#milvus.IndexType.ANNOY" title="Permalink to this definition">¶</a></dt>
<dd><p>ANNOY index. See <a class="reference external" href="https://milvus.io/docs/v1.0.0/index.md#ANNOY">ANNOY</a>.</p>
</dd></dl>

<dl class="attribute">
<dt id="milvus.IndexType.IVFLAT">
<code class="sig-name descname">IVFLAT</code><em class="property"> = 2</em><a class="headerlink" href="#milvus.IndexType.IVFLAT" title="Permalink to this definition">¶</a></dt>
<dd><p>Alternative name for <cite>IVF_FLAT</cite>. Reserved for compatibility.</p>
</dd></dl>

<dl class="attribute">
<dt id="milvus.IndexType.IVF_SQ8_H">
<code class="sig-name descname">IVF_SQ8_H</code><em class="property"> = 5</em><a class="headerlink" href="#milvus.IndexType.IVF_SQ8_H" title="Permalink to this definition">¶</a></dt>
<dd><p>Alternative name for <cite>IVF_SQ8H</cite>. Reserved for compatibility.</p>
</dd></dl>

</dd></dl>

</div>
<div class="section" id="metric-type">
<h2>Metric Type<a class="headerlink" href="#metric-type" title="Permalink to this headline">¶</a></h2>
<dl class="class">
<dt id="milvus.MetricType">
<em class="property">class </em><code class="sig-prename descclassname">milvus.</code><code class="sig-name descname">MetricType</code><a class="reference internal" href="_modules/milvus/client/types.html#MetricType"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#milvus.MetricType" title="Permalink to this definition">¶</a></dt>
<dd><p>Metric type enum.</p>
<dl class="attribute">
<dt id="milvus.MetricType.INVALID">
<code class="sig-name descname">INVALID</code><em class="property"> = 0</em><a class="headerlink" href="#milvus.MetricType.INVALID" title="Permalink to this definition">¶</a></dt>
<dd><p>Invalid metric type.</p>
</dd></dl>

<dl class="attribute">
<dt id="milvus.MetricType.L2">
<code class="sig-name descname">L2</code><em class="property"> = 1</em><a class="headerlink" href="#milvus.MetricType.L2" title="Permalink to this definition">¶</a></dt>
<dd><p>Euclidean distance. A metric for float vectors.
See <a class="reference external" href="https://milvus.io/docs/v1.0.0/metric.md#Euclidean-distance-L2">Euclidean distance</a>.</p>
</dd></dl>

<dl class="attribute">
<dt id="milvus.MetricType.IP">
<code class="sig-name descname">IP</code><em class="property"> = 2</em><a class="headerlink" href="#milvus.MetricType.IP" title="Permalink to this definition">¶</a></dt>
<dd><p>Inner product. A metric for float vectors.
See <a class="reference external" href="https://milvus.io/docs/v1.0.0/metric.md#Inner-product-IP">Inner Product</a>.</p>
</dd></dl>

<dl class="attribute">
<dt id="milvus.MetricType.HAMMING">
<code class="sig-name descname">HAMMING</code><em class="property"> = 3</em><a class="headerlink" href="#milvus.MetricType.HAMMING" title="Permalink to this definition">¶</a></dt>
<dd><p>Hamming distance. A metric for binary vectors.
See <a class="reference external" href="https://milvus.io/docs/v1.0.0/metric.md#Hamming-distance">Hamming distance</a>.</p>
</dd></dl>

<dl class="attribute">
<dt id="milvus.MetricType.JACCARD">
<code class="sig-name descname">JACCARD</code><em class="property"> = 4</em><a class="headerlink" href="#milvus.MetricType.JACCARD" title="Permalink to this definition">¶</a></dt>
<dd><p>Jaccard distance. A metric for binary vectors.
See <a class="reference external" href="https://milvus.io/docs/v1.0.0/metric.md#Jaccard-distance">Jaccard distance</a>.</p>
</dd></dl>

<dl class="attribute">
<dt id="milvus.MetricType.TANIMOTO">
<code class="sig-name descname">TANIMOTO</code><em class="property"> = 5</em><a class="headerlink" href="#milvus.MetricType.TANIMOTO" title="Permalink to this definition">¶</a></dt>
<dd><p>Tanimoto distance. A metric for binary vectors.
See <a class="reference external" href="https://milvus.io/docs/v1.0.0/metric.md#Tanimoto-distance">Tanimoto distance</a>.</p>
</dd></dl>

<dl class="attribute">
<dt id="milvus.MetricType.SUBSTRUCTURE">
<code class="sig-name descname">SUBSTRUCTURE</code><em class="property"> = 6</em><a class="headerlink" href="#milvus.MetricType.SUBSTRUCTURE" title="Permalink to this definition">¶</a></dt>
<dd><p>Superstructure. A metric for binary vectors,
only support <a class="reference internal" href="#milvus.IndexType.FLAT" title="milvus.IndexType.FLAT"><code class="xref py py-attr docutils literal notranslate"><span class="pre">FLAT</span></code></a> index.
See <a class="reference external" href="https://milvus.io/docs/v1.0.0/metric.md#Superstructure">Superstructure</a>.</p>
</dd></dl>

<dl class="attribute">
<dt id="milvus.MetricType.SUPERSTRUCTURE">
<code class="sig-name descname">SUPERSTRUCTURE</code><em class="property"> = 7</em><a class="headerlink" href="#milvus.MetricType.SUPERSTRUCTURE" title="Permalink to this definition">¶</a></dt>
<dd><p>Substructure. A metric for binary vectors, only support <a class="reference internal" href="#milvus.IndexType.FLAT" title="milvus.IndexType.FLAT"><code class="xref py py-attr docutils literal notranslate"><span class="pre">FLAT</span></code></a> index.
See <a class="reference external" href="https://milvus.io/docs/v1.0.0/metric.md#Substructure">Substructure</a>.</p>
</dd></dl>

</dd></dl>

</div>
</div>


           </div>
           
          </div>
    <a href="https://github.com/milvus-io/pymilvus">
        <img style="position: absolute; top: 0; right: 0; border: 0;" src="https://github.blog/wp-content/uploads/2008/12/forkme_right_green_007200.png?resize=149%2C149" class="attachment-full size-full" alt="Fork me on GitHub" data-recalc-dims="1">
    </a>

          <footer>
  
    <div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
      
        <a href="param.html" class="btn btn-neutral float-right" title="Index" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right"></span></a>
      
      
        <a href="tutorial.html" class="btn btn-neutral float-left" title="Tutorial" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> Previous</a>
      
    </div>
  

  <hr/>

  <div role="contentinfo">
    <p>
        &copy; Copyright 2019-2021 Zilliz. All rights reserved.
      
        <span class="commit">
          Revision <code>26c94265</code>.
        </span>
      

    </p>
  </div> 

</footer>

        </div>
      </div>

    </section>

  </div>
  

  <div class="rst-versions" data-toggle="rst-versions" role="note" aria-label="versions">
    <span class="rst-current-version" data-toggle="rst-current-version">
      <span class="fa fa-book"> Read the Docs</span>
      v: 1.0
      <span class="fa fa-caret-down"></span>
    </span>
    <div class="rst-other-versions">
      <dl>
        <dt>Versions</dt>
        
          <dd><a href="/en/latest/">latest</a></dd>
        
          <dd><a href="/en/stable/">stable</a></dd>
        
          <dd><a href="/en/1.0/">1.0</a></dd>
        
          <dd><a href="/en/0.4.0/">0.4.0</a></dd>
        
          <dd><a href="/en/0.3.0/">0.3.0</a></dd>
        
      </dl>
      <dl>
        <dt>Downloads</dt>
        
          <dd><a href="//pymilvus.readthedocs.io/_/downloads/en/1.0/pdf/">pdf</a></dd>
        
          <dd><a href="//pymilvus.readthedocs.io/_/downloads/en/1.0/htmlzip/">html</a></dd>
        
          <dd><a href="//pymilvus.readthedocs.io/_/downloads/en/1.0/epub/">epub</a></dd>
        
      </dl>
      <dl>
        <dt>On Read the Docs</dt>
          <dd>
            <a href="//readthedocs.org/projects/pymilvus/?fromdocs=pymilvus">Project Home</a>
          </dd>
          <dd>
            <a href="//readthedocs.org/builds/pymilvus/?fromdocs=pymilvus">Builds</a>
          </dd>
      </dl>
      <hr/>
      Free document hosting provided by <a href="http://www.readthedocs.org">Read the Docs</a>.

    </div>
  </div>



  <script type="text/javascript">
      jQuery(function () {
          SphinxRtdTheme.Navigation.enable(true);
      });
  </script>

  
   

</body>
</html>